<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
			function changeAgeAndReference(person) {
				person.age = 25;
				person = {
					name: 'John',
					age: 50
				};
				return person;
			}
			var personObj1 = {
				name: 'Alex',
				age: 30
			};
			var personObj2 = changeAgeAndReference(personObj1);
			console.log(personObj1.name); // -> ?
			console.log(personObj2.name); // -> ?
		</script>
	</body>

</html>